package com.yuexun.dhdoctor.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.widget.ImageView;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.yuexun.dhdoctor.R;


/**
 * Created by Administrator on 2017/3/13.
 */

public class ViewByUrlDialog extends Dialog {

    private ImageView viewShow;
    String writeUrl;

    public ViewByUrlDialog(Context context, String writeUrl) {
        super(context, R.style.loadingDialogStyle);
        this.writeUrl = writeUrl;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_view_by_url);
        viewShow = (ImageView) this.findViewById(R.id.view_show);

        if(writeUrl != null){
            ImageLoader.getInstance().displayImage(writeUrl, viewShow);
        }
    }
}
